//
//  UIViewController+SEGNaviAdd.h
//  SEGWorkOrderTest
//
//  Created by Clavis on 2019/4/2.
//  Copyright © 2019 Clavis. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "SEGActivityLotteryBubbleButton.h"

// 导航栏高度
#define kNavigationBarHeight [UIViewController seg_getNavigationBarHeight]
// 导航栏+状态栏高度
#define kNavigationBarAndStatusBarHeight (LYStatusBarHeight() + kNavigationBarHeight)
// 底部角标预留位置
#define kBottomBrandMargin (50 + LYSafeAreaBottom())

// 自定义导航背景视图tag
UIKIT_EXTERN NSInteger const kNavAdd_customNavTag;

@interface UIViewController (SEGNaviAdd)

@property (nonatomic, assign) CGFloat leftBarbuttonWidth;   ///<左侧按钮宽度 用于计算标题位置
@property (nonatomic, copy) void (^dismissAct)(void);       ///< 左侧按钮点击的block

@property (nonatomic, strong) SEGActivityLotteryBubbleButton *lotteryButton;
 
// 导航栏高度
+ (CGFloat)seg_getNavigationBarHeight;

#pragma mark - 左侧返回按钮
/// 导航栏左侧返回按钮 + 标题
- (void)showCustomNavigationBackButton;

// 导航栏左侧显示绿色返回按钮
- (void)showCustomNavigationGreedBackButton:(NSString *)imageNorName withPreImage:(NSString *)imagePreName;

// 显示导航栏左侧的按钮
- (void)showCustomNavigationLeftButtonWithTitle:(NSString *)aTitle image:(UIImage *)aImage hightlightImage:(UIImage *)hImage;

// 显示导航栏左边的按钮（可设置颜色）
- (void)showCustomNavigationLeftButtonWithColorTitle:(NSString *)aTitle image:(UIImage *)aImage hightlightImage:(UIImage *)hImage titleColor:(UIColor *)color;

#pragma mark - 右侧按钮
/// 展示导航栏右侧按钮
/// @param rightButton 右侧按钮
- (void)showCustomNavigationRightButton:(UIButton *)rightButton;

/// 展示导航栏右侧按钮
/// @param rightTitle 右侧标题
- (void)showCustomNavigationRightTitle:(NSString *)rightTitle;

/// 展示导航栏右侧按钮
/// @param rightImage  默认背景图片
/// @param rightHImage 高亮背景图片
- (void)showCustomNavigationRightImage:(UIImage *)rightImage hightlightImage:(UIImage *)rightHImage;

/// 展示导航栏右侧按钮
/// @param aTitle 右侧标题
/// @param aImage 默认背景图片
/// @param hImage 高亮背景图片
- (void)showCustomNavigationRightButtonWithTitle:(NSString *)aTitle image:(UIImage *)aImage hightlightImage:(UIImage *)hImage;

/// 展示导航栏右侧按钮
/// @param aTitle 右侧标题
/// @param aImage 默认背景图片
/// @param hImage 高亮背景图片
/// @param color 右侧标题字体颜色
- (void)showCustomNavigationRightButtonWithTitle:(NSString *)aTitle image:(UIImage *)aImage hightlightImage:(UIImage *)hImage color:(UIColor *)color;

// 显示导航栏右边的按钮 可设置不可用的颜色
- (UIButton *)showCustomNavigationRightButtonWithColorTitle:(NSString *)aTitle titleColor:(UIColor *)color disabledColor:(UIColor *)disabledColor;

//显示两个导航栏右边的按钮
- (void)showTwoRightButtonWithTitle:(NSString *)aTitle1 image1:(UIImage *)aImage1 hightlightImage1:(UIImage *)hImage1
                             title2:(NSString *)aTitle2 image2:(UIImage *)aImage2 hightlightImage1:(UIImage *)hImage2;

// 导航右侧的按钮
- (void)hlb_showCustomNavigationRightButtonWithColorTitle:(NSString *)aTitle image:(UIImage *)aImage titleColor:(UIColor *)color;

#pragma mark - 处理底部角标
- (void)seg_addBottomBrand;
- (void)seg_removeBottomBrand;

#pragma mark - Event
//右侧按钮点击
- (void)onNavigationRightButtonClicked:(UIButton *)sender;
//中间按钮点击
- (void)onNavigationMiddleButtonClicked:(UISegmentedControl *)sender;
//右侧第一个按钮点击
- (void)onNavigationRightButton1Clicked:(UIButton *)sender;
//右侧第二个按钮点击
- (void)onNavigationRightButton2Clicked:(UIButton *)sender;
//左侧按钮点击
- (void)onNavigationLeftButtonClicked:(UIButton *)sender;
 
@end
